package com.pretty.test.controller.pets.problem.wrapper;

import com.pretty.test.controller.pets.problem.vo.ProblemPageVO;
import com.pretty.test.entity.PetsProblem;
import com.pretty.test.utils.otherutils.BeanUtil;
import com.pretty.test.utils.wrapper.BaseEntityWrapper;

import java.util.Objects;

/**
 * 常见问题分页包装类
 * @author dujianyu
 * @since 2021-04-09
 */
public class ProblemPageWrapper extends BaseEntityWrapper<PetsProblem, ProblemPageVO> {

    public static ProblemPageWrapper build(){
        return new ProblemPageWrapper();
    }

    @Override
    public ProblemPageVO entityVO(PetsProblem entity) {
        ProblemPageVO vo = Objects.requireNonNull(BeanUtil.copy(entity, ProblemPageVO.class));
        return vo;
    }
}
